cmake_minimum_required(VERSION 3.0)

project(PROJECT1_BVP)

find_package(PkgConfig REQUIRED)
pkg_check_modules(LAPACKE REQUIRED lapacke)
pkg_check_modules(JSONCPP REQUIRED jsoncpp)

link_directories("/usr/local/lib")
include_directories("${PROJECT_SOURCE_DIR}/include")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") 

#default compiler
set(CMAKE_C_COMPILER "/usr/bin/gcc") 
set(CMAKE_CXX_COMPILER "/usr/bin/g++") 

add_subdirectory(main)

add_subdirectory(doc)

set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/build") 

add_custom_target(runExamples
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/build
COMMAND ./PROJECT1_ASSIGNMENT ../example/*.json
)

add_custom_target(cleanOutput
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND rm -rf output/*.m
)
